package com.shouhuobao.take.verify;

import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.widget.TextView;

import com.iseastar.guojiang.BaseFragment;
import com.shouhuobao.station.R;

/**
 * 标准级别驿站
 */
public class RegRank2Fragment extends BaseFragment {

    private String str1 = "<font color=#848C97>专业</font><font color=#12344c>在线培训、线下辅导，免费使用</font><font color=#848C97>火箭投递快递系统</font>";
    private String str2 = "<font color=#848C97>周周pk活动、邀请奖励活动等大量营销活动</font><font color=#12344c>免费参与、优先参与</font><font color=#848C97>抢占先机</font>";
    private String str3 = "<font color=#848C97>400客服支持、远程培训、助力</font><font color=#12344c>提升业绩</font><font color=#848C97>、微信</font><font color=#12344c>专属客服</font><font color=#848C97>支持</font>";
    private String str4 = "<font color=#848C97>安装物料用户自助使用业务、</font><font color=#12344c>省时、省心、省力</font>";
    private String str5 = "<font color=#848C97>代收包裹</font><font color=#12344c>24小时</font><font color=#848C97>服务</font><font color=#12344c>保障,</font><font color=#848C97>到店通知更及时、包裹管理</font><font color=#12344c>更安全</font>";
    private String str6 = "<font color=#12344c>驿站+商品+社群，</font><font color=#848C97>全新体系，</font><font color=#12344c>优先</font><font color=#848C97>入局，</font><font color=#12344c>赚钱快</font><font color=#848C97>人一步！</font>";
    private String title3 = "社群电商体系优先入局（部分地区开通）";

    @Override
    protected void findViewById() {
        setContentView(R.layout.fragment_reg_rank2);
        super.findViewById();
        ((TextView) findViewById(R.id.str1_tv)).setText(Html.fromHtml(str1));
        ((TextView) findViewById(R.id.str2_tv)).setText(Html.fromHtml(str2));
        ((TextView) findViewById(R.id.str3_tv)).setText(Html.fromHtml(str3));
        ((TextView) findViewById(R.id.str4_tv)).setText(Html.fromHtml(str4));
        ((TextView) findViewById(R.id.str5_tv)).setText(Html.fromHtml(str5));
        ((TextView) findViewById(R.id.str6_tv)).setText(Html.fromHtml(str6));
        ((TextView) findViewById(R.id.title1_tv)).setText(setSpannableStr(title3, 9, title3.length()));

    }

    private SpannableString setSpannableStr(String content, int start, int end) {
        SpannableString spannableString = new SpannableString(content);
        AbsoluteSizeSpan sizeSpan = new AbsoluteSizeSpan(15, true);
        AbsoluteSizeSpan sizeSpan1 = new AbsoluteSizeSpan(12, true);
        spannableString.setSpan(sizeSpan, 0, start, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        spannableString.setSpan(sizeSpan1, start + 1, end, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        return spannableString;
    }
}
